home *** CD-ROM | disk | FTP | other *** search
Text File | 1990-10-24 | 69.6 KB | 2,509 lines |
-
-
-
- S C A N L O N E N T E R P R I S E S
-
- B A T C H F I L E U T I L I T I E S
-
- Version 2.2 (SEBFU)
-
- (C) 1989
-
-
-
-
- U S E R S M A N U A L
-
-
-
-
-
- Don't forget to register SEBFU, just print the REG.DOC file. To
- print the file, enter TYPE REG.DOC > PRN or COPY REG.DOC PRN
- at your DOS prompt. Alternately, you can print it using any text
- or wordprocessor.
-
-
- SEBFU may be run on any single user system, or in Network systems
- with less than 4 users, without obtaining a site license. Site
- licenses are available at reasonable rates, just call (805) 272-
- 4827 or write us at 38354 17th St. E #D, Palmdale, CA 93550.
-
- SEBFU is a series of small utilities which when combined, offer
- an improvement over the stand alone Dos environment, in running
- batch files. These utilities will allow the user to detect and
- react to many different system types, in creating batch files and
- menu systems. To get an idea of how to use the utilities
- together, just run our demo (by entering GO at the Dos prompt).
-
- SEBFU is for any user of IBM and compatibles who wishes to make
- their system easier to use, for system integrators and for
- software distributors. System integrators will find creating
- batch files and menus easy and convenient. Software distributors
- will want to make batch files to help the end users with
- installation and automate backups'.
-
- SEBFU (version 2.2) has over 100 commands, which will enhance and
- add power to batch files. These utilities allow for the creation
- and maintenance of menus, retrieval of single or multiple key
- strokes in response to questions or menu queries, check for many
- system drivers (such as the mouse driver), complete control over
- the cursor and screen colors, checking the disk drives and
- printer, get and display directory listings and files, much more.
-
- GETTING STARTED:
-
- To print this document, just enter GO at the Dos prompt, and
- select print manual at the menu.
-
- SYSTEM REQUIREMENTS
-
- IBM or compatible with 1 disk drive and 128K ram. These
- utilities will work with monochrome or color systems, including
- EGA and VGA, excepting the use of color commands on monochrome
- systems.
-
-
-
-
-
- D O S
-
- DOS is the operating system of your IBM or compatible, whether it
- be PC-Dos or MS-Dos. Both Dos systems are made by Microsoft and
- for our purposes are identical. DOS stands for Disk Operating
- System, allows execution of applications such as wordprocessors
- and spreadsheets. Most users don't see or interact directly with
- Dos, but only with the command interpreter which is supplied with
- it. The command interpreter is a file called COMMAND.COM . This
- is the program which we as users, see each time we boot up our
- systems and eventually see the Dos prompt.
-
- COMMAND.COM is often called a SHELL. What this means, is that it
- hides the rest of Dos from us, and allows us to communicate with
- our computers in a language which is easier to understand.
-
- DOS offers us a medium for interfacing and controlling our system
- environment such that files are stored in a logical and
- meaningful fashion on disks. Without this interface,
- applications would be placing files almost anywhere on the disk
- drive, thus possibly overwriting another applications file. This
- Dos environment also offers us a common medium to communicate
- with the IBM components such as the monitor, keyboard and
- printers.
-
- COMMAND.COM allows us to enter the name of some application, at
- the Dos prompt, then will execute that application, by parsing
- the name to Dos, which then causes the execution of the
- application. While our application, COMMAND.COM is out of the
- picture (except for a very small part which stays in ram), and
- the application corresponds directly with Dos, to perform all of
- the necessary tasks.
-
- What can COMMAND.COM do ? COMMAND.COM can act as an interface
- between you and many of the utilities (such as FORMAT) which are
- provided along with Dos. For example, when you want to format a
- disk, you simply enter FORMAT at the Dos prompt, followed by the
- drive letter of the drive to format. Another useful Dos utility
- is the COPY command, which copies files from one disk to another.
- What about the directory command DIR ? Another well used Dos
- utility, which will display one or more files, giving you
- information about the file(s), such as size and time and date of
- creation.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Each IBM or compatible may have one or more disk drives, and each
- drive may have one or more directories. As you know, a disk
- drive is a device to store many bytes (thousands of bytes) of
- information or programs. A directory is one of the ways Dos has
- of letting us name files. Without directories, hard disk systems
- would soon become cluttered with hundreds of files in one
- directory, and we would become confused as to what file were for
- what. Not only that, but with the 8 character limit imposed on
- us by Dos, we would soon be having trouble making up names.
-
-
- D I R E C T O R I E S
-
- A directory is much like a file cabinet, which contains drawers,
- except, that each drawer may contain additional drawers. The
- root directory is much like the office which contains the file
- cabinet, and can contain many such file cabinets. We can of
- course clutter our office with files, but we could loose them, or
- accidentally throw it away (erase it). Thus not only do
- directories offer us storage, but helps us keep from accidentally
- erasing the files. Just like a real filing cabinet, these
- directories help us organize, and keep different types of data
- separate.
-
- DOS can be considered somewhat like an office worker, who must
- find files for the boss (you). If the files were just strewn
- across the office, they would be harder to find, so just like a
- secretary, we keep our files in directories in some recognizable
- format, so we and Dos can find them faster.
-
- Another reason, to have directories, is because Dos simply will
- not allow you more than 112 files in the root directory,
- including directory names. On a floppy, this limitation is not
- so bad, but with hard disks, this can really be a problem. As
- you may already know, Dos does allow more than 112 files in the
- root directory of a hard disk. The maximum number of files
- allowed on a hard disk is usually 500, but even that is too few,
- once we start using our programs, such as wordprocessors,
- spreadsheets and databases.
-
-
- STARTING DOS
-
- Starting Dos is usually a simple matter of placing your Dos boot
- disk into your floppy drive and turning your machine on. Systems
- with hard drives don't even have that requirement, simply turning
- the system on causes Dos to start. For those of you who have and
- know about the Dos Config file and Autoexec batch file, please
- skip the rest of this section and start on page 5, SEBFU
- commands.
-
-
- You are presumably reading this page because you would like
- information about your Dos config file and autoexec file. The
- config file is the first file that is loaded after the actual Dos
- operating system loads (including COMMAND.COM). This file
- contains information such as the number of files a program can
- open at one time, the number of file buffers, the loading of
- device drivers, the number of drives on your system and finally,
- the type of shell (like COMMAND.COM) to load. Here are the lines
- we consider (and so do many other vendors) important to have in
- your config file :
-
- FILES=20 {Maximum files a program can open}
- BUFFERS=10 {Number of file buffers}
- LASTDRIVE=F {Last available drive in your system}
- SHELL=A:\COMMAND.COM /P /E:1000
-
- Notice the last line above, this is what starts COMMAND.COM the
- Dos shell. Here, we have specified that 1000 bytes be set aside
- for the Dos environment, which is a set of variables that Dos and
- applications can share, to pass information back and forth. The
- '/P' specifies that this shell will remain resident without
- returning to another level. This line only functions in Dos
- versions 3.0 and greater.
-
- A common AUTOEXEC batch file would look like this.
-
- ECHO OFF {disable command echoing}
- CLS {clear the monitor}
- PROMPT=$P$G {set the Dos prompt to display drive
- and directory}
- PATH=A:\ {tell Dos to look at the root directory
- of drive A for commands it can't find
- on the current drive and directory}
- TIMER {Sets the Dos time and Date on XT's
- which have a real time clock}
-
- This last line above requires a file called TIMER.COM, not
- supplied with Dos, or you may substitute your own driver name.
-
- If you have more commands than the above in your config or
- autoexec files, don't worry, there are many more commands which
- can be included, we have just placed the minimum lines required
- for good Dos operation, and use of our batch file utilities. If
- both these files exist on your system, and these lines don't
- exist in them, you can add these lines by using any text editor
- or most wordprocessors. If you have any doubts, consult your
- system or Dos manual, or call your dealer.
-
-
-
-
-
- SEBFU COMMANDS
-
-
- ADD Syntax : ADD var v
-
- Where 'var' is any legal Dos variable, previously assigned at
- least zero (set var=0) and 'v' is the amount to add to 'var', and
- is in the range of 0 thru 9, with a default value of 1, if 'v' is
- not specified.
-
- This command enhances the use of batch files by allowing loop
- control. The variable specified in the add (after previously
- being assigned by the Dos SET function), can be tested by the Dos
- IF function as follows :
-
- IF var==v command
-
- Where 'var' is the variable, 'v' the the value sought and command
- is any legal Dos command, including the SEBFU utilities.
-
- EXAMPLE :
-
- ECHO OFF
- CLS
- SET ADD=0
- :LP
- IF %ADD%==5 GOTO DONE
- ADD ADD
- ECHO Loop %ADD%
- GOTO LP
- :DONE
- ECHO Process complete
-
- In the above example, we start off with by turning echo mode off,
- then clearing the display and finally setting the initial value
- of ADD (required) to 0. The label LP starts our loop, where we
- first check our current value, with the Dos IF function, for a
- value of 5, and if the value is 5, the we jump to the label DONE.
- Notice that this test is made by using a double equal sign
- following the IF function. This is required by Dos, to
- distinguish it from the set function, which we used on line 3.
- The line after the IF increments the ADD variable by 1 (the
- default value). The ECHO line displays the message about which
- loop we are in and the GOTO loops the batch file execution back
- to the LP label. If the test made in the IF line is true (ADD is
- equal to 5) then the batch file branches to the label DONE, and
- then on to the last ECHO line which declares the batch file is
- completed. Notice that labels are prefixed with a colon, this is
- required by Dos, and is the only way the label can be
- distinguished from a command. This short batch file is on our
- disk and is called ADD.BAT .
-
- BEEP Syntax : BEEP [n] [P] [K]
-
- Where 'n' specifies the number of beeps, 'P' causes the beeps to
- occur every second (instead of right away) and 'K' causes the
- beeps to occur every second until a key is pressed.
-
- EXAMPLE :
-
- ECHO OFF
- CLS
- ECHO We will beep 5 beeps rapidly
- BEEP 5
- ECHO Now we will beep 5 beeps at 1 second intervals
- BEEP 5 P
- ECHO Finally we will beep until you press any key
- BEEP K
- ECHO Beep demonstration complete.
-
- This short batch file goes thru each possible option, displaying
- a message announcing each test. The last test requires the user
- to press any key to stop the beeping. NOTE, entering BEEP on a
- line by itself (no parameters), causes one single beep.
-
-
- BIGLTR Syntax : BIGLTR message, bc fc
-
- Where 'message' is any 10 alpha numeric characters (ascii values
- in the range of 0 thru 255), 'bc' is the background color and
- 'fc' the foreground color. This command will display, starting
- at the current row and column, any text included in 'message', as
- long as you do not exceed the 10 character limit. If 'message'
- is longer than 10 characters, then 'message' will be truncated at
- the tenth character. The characters so displayed will be large
- characters of 9 rows by 8 columns.
-
-
-
- CDCK Syntax : CDCK
-
- Simply returns an errorlevel of 1 if the CD-Rom driver is
- present, else returns an errorlevel of 0.
-
- EXAMPLE :
- CDCK
- IF ERRORLEVEL 1 ECHO CD-ROM driver installed
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- CDD Syntax : CDD n
-
- Where 'n' is the number of directory levels to move toward the
- root directory.
-
- Assume your are on drive C and in the directory \A\B\G\Y\TUG
-
- Then execution of this line :
-
- CDD 3
-
- Would place you in the directory \A\B
-
-
-
- CGABORDR Syntax : CGABORDR n
-
- Changes the CGA border color to the selected value of 'n'.
-
- Example :
- CGABORDR 1
-
- Will produce a blue border. Colors are in the range of 0 thru
- 15, see your Dos or Basic manual for more information on colors.
-
-
-
- CHGC Syntax : CHGC sr sc er ec bc fc
-
- Changes the screen colors, without affecting the screen
- characters, for the selected screen range.
-
- Where 'sr' is the start row, 'sc' the start column, 'er' the
- ending row, 'ec' the ending column, 'bc' the background color and
- 'fc' the foreground color.
-
- EXAMPLE :
-
- CHGC 5 5 20 75 1 7
-
- Will change the screen colors starting at row 5, column 5 thru
- row 20, column 75 to white on blue.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- CHGLOCK Syntax : CHGLOCK [C] [N] [S]
-
- Toggles the existing state of the selected lock key, where,
- C=caps lock, N=num lock and S=Scroll lock. CHGLOCK without any
- parameters causes all current settings to reverse (toggle).
-
-
- EXAMPLE 1 :
-
- CHGLOCK C
-
- Will just toggle the caps lock. If caps lock was on, then caps
- lock will be toggle off.
-
- EXAMPLE 2 :
-
- CHGLOCK NC
-
- Will toggle both caps lock and num lock. Both locks will be the
- reverse of what they were prior to executing CHGLOCK.
-
- EXAMPLE 3 :
-
- CHGLOCK
-
- This will toggle all 3 locks.
-
-
- CHKSUM Syntax : CHKSUM fname n
-
- Where 'fname' is the file to get a check sum for, and 'n' is an
- optional checksum value to compare the calculated one with.
-
- EXAMPLE 1 :
-
- CHKSUM fname
-
- Displays the checksum for file 'fname'
-
- EXAMPLE 2 :
-
- CHKSUM fname 123
-
- Returns an errorlevel of 0 if the checksum of 'fname' matches the
- value 123, else will return an error level of 1.
-
-
-
-
-
-
-
-
- CK101
-
- Returns an errorlevel of 0 if a 101 type keyboard is attached,
- providing the Rom Bios supports this mode, else returns an
- errorlevel of 1.
-
-
- CKCLK
-
- Returns an errorlevel of 1 if Dos reports the year 1980 else
- returns an errorlevel of 0. Use this as a first guess that the
- Dos time and date has been set.
-
-
- CLR sr sc er ec bc fc
-
- Clears the screen starting at the specified row 'sr' and column
- 'sc' thru row 'er' and column 'ec' using the specified colors
- 'bc' (background) and 'fc' (foreground).
-
- EXAMPLE 1:
- CLR 1 1 25 80
-
- Clears lines 1 thru 25, columns 1 thru 80 using what ever color
- exists at the current cursor location.
-
- EXAMPLE 2:
- CLR 1 1 25 80 1 7
-
- Same as example 1, but uses the selected color of white on blue.
-
-
- CLRKEY
-
- Clears the type ahead buffer. Prevents the user from entering
- responses in advance of the questions or prompts.
-
-
- COFF
-
- Toggles the cursor off on most MGA and CGA systems, but will NOT
- always work on MGA systems, and won't work on EGA or VGA systems.
-
-
- COLOR bc fc
-
- Sets the screen colors, providing that ANSI.SYS or other ANSI
- driver has been installed. The colors are set to the selected
- background 'bc' and foreground 'fc' color. Prior to using this,
- use our DETANSI function to check for the existence of the driver
-
- CR [T]
-
- Waits for the ENTER key to be pressed. All key strokes simply
- cause the speaker to beep. Or optionally by entering the T switch
- on the command line, will exit with an errorlevel of 1 if control
- C is pressed.
-
-
- CT
-
- Toggles the cursor on or off, depending upon which state it is
- currently in. CT does NOT work on all systems.
-
-
- CUON
-
- Makes the cursor visible.
-
-
- CURKEY
-
- Returns an errorlevel of 1 thru 4 depending upon which of the
- four cursor control keys is pressed. The four values are :
-
- 1 = up arrow 2 = down arrow
- 3 = left arrow 4 = right arrow
-
- If the enter key is pressed or escape keys are pressed, the an
- errorlevel of 0 is returned, any other key press will result in
- the speaker beeping.
-
-
- DAYOFMO
-
- Returns an errorlevel of 1 thru 31 for the current day of the
- month as reported by Dos. Dos must have the correct time and
- date for this to function properly. To determine if the Dos time
- and Date are set, use our CKCLK function.
-
-
- DAYOFWK [mm-dd-yy] [D]
-
- In the functions basic format, returns an errorlevel representing
- the day of week (Sunday = 1 .... Saturday = 7). In the second
- format, the user specifies the date to return the day of week for
- in the format 'mm-dd-yy' and finally the last format returns the
- day of month, by appending the letter 'D' (upper or lower case)
- after the function name.
-
-
-
-
- {DAYOFWK} continued
-
- EXAMPLE 1:
-
- DAYOFWK
-
- Returns an errorlevel of 1 thru 7 for the day of week, as
- reported by Dos, where Sunday is 1 and Saturday is a 7.
-
- EXAMPLE 2:
-
- DAYOFWK 01-23-87
-
- Returns an errorlevel of 1 thru 7 for the day of week for the
- selected date of Jan. 23rd, 1987, where 1 is Sunday and 7 is
- Saturday.
-
- EXAMPLE 3:
-
- DAYOFWK D
-
- Returns an errorlevel of 1 thru 31 for the day of the month, for
- the month and year as reported by Dos.
-
-
- DBLBOX sr sc er ec bc fc Pp
-
- Draws a double line graphics box starting at row 'sr', column
- 'sc' and ending at row 'er' column 'ec', using the background
- color 'bc' and foreground color 'fc' on page 'p' (prefixed by the
- P {upper or lower case}).
-
- EXAMPLE 1:
-
- DBLBOX 5 5 10 25
-
- Places a double box starting on row 5 column 5 and ending at row
- 10 column 25, using the colors as existing at row 5, column 5.
-
- EXAMPLE 2:
- DBLBOX 5 5 10 25 1 7
-
- Same as above, but uses the selected colors of white on blue.
-
- EXAMPLE 3:
- DBLBOX 5 5 10 25 1 7 P2
-
- Same as example 3, but puts the box on video page 2, which may or
- may not be the active video page.
-
-
-
- DETANSI
-
- Returns an errorlevel of 1 if an ansi device drive is installed,
- a 0 if an ansi driver is not installed, or a 2 if the video mode
- is graphics.
-
-
- DFREE d: [vname]
-
- Returns an errorlevel in K bytes for bytes available on a
- selected drive 'd:', or places the exact value in a selected
- variable 'vname'. The selected drive letter may be upper or lower
- case, and must be prefixed with the colon. Alternately, will
- return an errorlevel of 0 if an incorrect drive is specified and
- the variable is not specified, or a 1 if the variable is
- specified and the selected drive is not available.
-
- EXAMPLE 1:
- DFREE A:
-
- Returns an error of 0 thru 255 for the amount of available space
- on drive A.
-
- EXAMPLE 2:
- DFREE A: AFREE
-
- Returns the exact amount of unused disk space in variable AFREE
- or an errorlevel of 1 if the drive is unavailable (no disk, not
- formatted, etc...).
-
-
- DLINE sr sc l bc fc p S
- DLINE Pp l S
-
- Draws a double or single line, using double or single line
- graphics on the video or sends the line to the selected printer,
- using length 'l', starting on row 'sr' column 'sc' (video), using
- the background color 'bc' and foreground color 'fc' on page 'p'.
-
- EXAMPLE 1:
- DLINE sr sc l
-
- Draws a double line using double line graphics, on line 'sr', at
- starting at column 'sc' and of length 'l'. This method also uses
- the existing screen colors as exist at location 'sr','sc', and
- defaults to the active video page.
-
-
-
-
-
-
- {DLINE} continued
-
- EXAMPLE 2:
- DLINE 5 5 20 1 7
-
- Draws a double line as in example 1 on row 5, starting on column
- 5, with a length of 20, using the selected colors of white on
- blue.
-
- EXAMPLE 3:
- DLINE 5 5 20 1 7 2
-
- Draws the double line as in example 2, but on video page 2, which
- may or may not be active.
-
- EXAMPLE 4:
- DLINE 5 5 20 1 7 2 S
-
- Draws a line as in example 3, but uses single line graphics.
-
- EXAMPLE 5:
- DLINE P1 20
-
- Draws a line to the first printer, using double line graphics, of
- length 20.
-
- EXAMPLE 6:
- DLINE P1 20 S
-
- Same as example 5, except uses single line graphics.
-
-
- DLST ftype [/Ln] [/Rn] [/Bn] [/Tn] [/E list]
- [/I list] [/X] [/D] [/Z]
-
- Displays a list of files in the current directory, where :
-
- ftype is the type of file(s) to display, and can use the Dos
- wildcards (*.*, ???.???).
-
- /Ln = Left margin of 'n' /Rn = Right margin of 'n'
- /Bn = Last margin 'n' to use /Tn = First line to use 'n'
- /E list = exclude list /I list = include list
- /X = no extensions shown /D = show directories
- /Z = stop listing at line 'Bn'
-
- Under normal execution (without the /Z option), if the list is
- longer than rows Tn thru Bn then the function halts, waiting for
- the user to press enter to continue.
-
-
- {DLST} continued
-
- EXAMPLE 1:
- DLST *.DOC
-
- Displays a list of DOC files using all of the available video,
- pausing after filling the display.
-
- EXAMPLE 2:
- DLST *.DOC /L5 /R5
-
- Displays a list of DOC files as example 1, but limits the output
- to columns 5 thru 75 (80-5).
-
- EXAMPLE 3:
- DLST *.DOC /L5 /R5 /B20 /T5
-
- Displays a list of DOC files as example 2, but limits the output
- to lines 5 thru 20.
-
- EXAMPLE 4:
- DLST *.* /L5 /R5 /B20 /T5 /E COM EXE
-
- Displays all files, limited to row 5 thru 20, and column 5 thru
- 75 and excluding extensions of COM and EXE.
-
- EXAMPLE 5:
- DLST *.DOC /L5 /R5 /B20 /T5 /I COM EXE
-
- Same as example 3, but includes file types of COM and EXE .
-
- EXAMPLE 6:
- DLST *.DOS /L5 /R5 /B20 /T5 /X
-
- Same as example 3, but does NOT show extensions.
-
- EXAMPLE 7:
- DLST *.DOS /L5 /R5 /B20 /T5 /D
-
- Same as example 3, but shows directories as well.
-
- EXAMPLE 8:
- DLST *.DOS /L5 /R5 /B20 /T5 /Z
-
- Same as example 3, but only shows number of files which can fit
- onto lines 5 thru 20.
-
-
-
-
-
-
-
- DRVCK d:
-
- Returns an errorlevel of 0 if the specified drive exists, a 1 if
- the drive does not, or 2 if the drive was not specified. This
- does not check to see if a drive is installed, only if the drive
- is a valid drive.
-
-
- DRVLST var
-
- Places a list of drives available into the Dos variable 'var'.
-
- If for instance, you have 2 floppies and a hard drive, the
- entering this function, would return 'ABC' in the selected var.
-
- If you have set up a ram drive or used SUBST, then this function
- will also place those additional drive names into the list. IE..
- if your ram drive is D then the list returned in the varible
- would be 'ABCD'.
-
-
- DSKRDY d:
-
- Returns an errorlevel of 0 if the drive is ready, with a
- formatted disk, an errorlevel of 1 if the drive exists, but is
- not ready, 2 if the drive has an unformatted disk installed, and
- 3 if the drive does not exist.
-
- EXAMPLE 1:
- DSKRDY A:
- IF ERRORLEVEL 3 GOTO NXIST
- IF ERRORLEVEL 2 GOTO FMT
- IF ERRORLEVEL 1 GOTO BAD
- ECHO Drive is formatted
- GOTO XIT
- :NXIST
- ECHO Drive does not exist
- GOTO XIT
- :BAD
- ECHO Drive is not ready (no disk installed)
- GOTO XIT
- :FMT
- ECHO Format disk in drive A ?
- YN
- IF ERRORLEVEL 1 GOTO XIT
- FORMAT A
- :XIT
- {BLANK LINE}
-
-
-
-
- {DSKRDY continued}
-
- In the above example, we display a message for each case, and if
- the user wants, we will format a blank unformatted disk. The
- line containing YN is another function we have, which simply
- waits for a key press of y or n (upper or lower case).
-
-
- ENVSIZE [TL] [L] [T] [TS] [TK] [B] [K] [V] [R]
-
- Returns an errorlevel based upon the amount of Dos environment
- space left or the total environment space size.
-
- EXAMPLE 1:
- ENVSIZE
-
- Returns an errorlevel of 0 - 255 for each 256 bytes of free
- space (IE... 1=256, 2=512, etc...).
-
- EXAMPLE 2:
- ENVIZE TL
-
- Returns an errorlevel of 0 if less than 256, 1 if less than 4096
- and 2 if greater than 4096 (total environment space)
-
-
- {ENVSIZE continued}
-
- EXAMPLE 3:
- ENVSIZE L
-
- Same as example 2, except that it's for environment space left.
-
- EXAMPLE 4:
- ENVSIZE T
-
- Returns an errorlevel of 0 thru 255 for the amount of environment
- space left, in units of 256 bytes.
-
- EXAMPLE 5:
- ENVSIZE TS
-
- Returns an errorlevel of 0 thru 255 for the amount of environment
- space left, in bytes.
-
- EXAMPLE 6:
- ENVSIZE TK
-
- Returns an errorlevel of 0 thru 255 for the amount of
- environspace left, in k bytes.
-
-
- {ENVSIZE continued}
-
- EXAMPLE 7:
- ENVSIZE B
-
- Returns an errorlevel of 0 to 255 for the amount of environment
- space left, in bytes.
-
- EXAMPLE 8:
- ENVSIZE K
-
- Returns an errorlevel of 0 to 255 for the amount of environment
- space left in k bytes.
-
- EXAMPLE 9:
- ENVSIZE V
-
- Places the total amount of environment space into the variable
- ESIZE.
-
- EXAMPLE 10:
- ENVSIZE VR
- Places the amount of environment space left into the variable
- ESIZE.
-
-
- FCHR sr sc er ec bc fc p c
-
- Fills the selected video area with the selected character, where:
-
- sr = start row sc = start column
- er = ending row ec = ending column
- bc = background color fc = foreground color
- p = video page c = fill character
-
- Any single character entered for 'c' results in that character
- being used as the fill pattern, if two or more characters are in
- the 'c' position, then it is assumed you want to use a decimal
- value, and may be from 2 to 3 decimal digits (0-9) ranging in
- value from 0 to 255. For characters with values less than 10,
- prefix the value with a zero.
-
- EXAMPLE 1:
- FCHR 5 5 10 75 1 7 0 A
-
- Fills the video area from row 5 column 5 thru row 10 column 75
- with A's using white on blue on video page 0.
-
-
-
-
-
- EXAMPLE 2:
- FCHR 5 5 10 75 0 7 0 65
-
- Same as example 1.
-
- EXAMPLE 3:
- FCHR 5 5 10 75 1 7 1 65
-
- Same as example 1, except that video page 1 is used.
-
- (NOTE) video pages 0 and 1 are identical to this function.
-
-
- FILES ftype vname /E list /I list
-
- Returns an errorlevel equal to the number of files of the type
- 'type'. User may specify additional file types by using the /I
- followed by a list (of up to 10) additional extension types, or
- may exclude file types from a listing when using the "*" wild
- card, by entering a /E followed by up to 10 extension types.
- Alternately, the number of files will be returned in a selected
- variable.
-
-
- EXAMPLE 1:
-
- FILES *.DOC
-
- Returns an errorlevel of 0 thru 255 depending upon the number of
- DOC files in the current directory.
-
- EXAMPLE 2:
- FILES *.DOC DOCS
-
- Returns the number of DOC files in the variable DOCS.
-
- EXAMPLE 3:
- FILES *.DOC /I EXE
-
- Same as example 1, except value includes EXE files as well.
-
- EXAMPLE 4:
- FILES *.DOC DOCS /I EXE
-
- Same as example 2, except value includes EXE files.
-
- EXAMPLE 5:
- FILES *.* /E EXE COM
-
- Returns an errorlevel of 0 thru 255 for the number of files,
- except for those with extensions of EXE and COM.
-
- {FILES continued}
-
-
- EXAMPLE 6:
- FILES *.* FILES /E EXE COM
-
- Same as example 5, except the number of files is returned in the
- variable FILES instead of an errorlevel.
-
-
- FNDHID fname
-
- Displays a bit representation of the selected file 'fname' at-
- tribs, where the output is an 8 digit decimal display of 1's and
- 0's. The output is interpreted as follows when the bits are set:
-
- Bit 1 = Read Only, Bit 2 = Hidden, Bit 3 = System
- Bit 4 = Volume lable, Bit 5 = Directory name, Bit 6 = Archived
- Bit 7 & 8 = Reserved
-
-
- FREEM [var][/E]
-
- Displays the amount of system ram available.
-
- Or alternately sets the variable 'var' equal to this value.
-
- Using the switch '/E', we can set the errorlevel equal to the
- amount of system ram available divided by 4K.
-
-
- EXAMPLE 1:
- FREEM
-
- Simply displays the amount of system ram available
-
- EXAMPLE 2:
- FREEM MEM
-
- Sets the Dos variable MEM equal to the amount of system ram left
-
- EXAMPLE 3:
-
- FREEM /E
-
- Sets the Dos errorlevel equal to the amount of system ram divided
- by 4K (IE...64K=16).
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {FREEM continued}
-
- EXAMPLE 4:
- FREEM MEM /E
-
- Sets the Dos variable MEM equal to the system ram left divided by
- 4K .
-
-
- FSIZE fname vname
-
- Returns an errorlevel of 0 thru 255 for the size of the file
- 'fname', or alternately places the size (in K bytes) into the
- variable 'vname'.
-
- EXAMPLE 1:
- FSIZE FSIZE.COM
-
- Returns an errorlevel of 0 thru 255 for the size of FSIZE in k
- bytes.
-
- EXAMPLE 2:
- FSIZE FSIZE.COM SIZE
-
- Same as example 1, except the size is returned in the variable
- SIZE.
-
-
- FUNKEY
-
- Returns an errorlevel of 1 thru 10 for the 10 function keys, all
- other key presses cause the speaker to beep.
-
-
- GALF
-
- Returns an errorlevel of 1 thru 26 for any alpha key pressed,
- upper or lower case, all other key presses causes the speaker to
- beep.
-
-
- GCURS [R] [Rv] [C] [Cv] [V]
-
- Returns an errorlevel for either the row or column position of
- the cursor, or alternately places the row / column information
- into the variables ROW and COL.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {GCURS continued}
-
- EXAMPLE 1:
- GCURS R
-
- Returns an errorlevel equal to the current row.
-
- EXAMPLE 2:
- GCURS R5
-
- Returns an errorlevel of 0 if the value 5 and the current row are
- equal, a 1 if the row is greater than 5 and 2 if the row is less
- than 5.
-
-
-
- {GCURS} continued
-
- EXAMPLE 3:
- GCURS C
-
- Same as example 1, except that the errorlevel is for the column.
-
- EXAMPLE 4:
- GCURS C5
-
- Same as example 2, except that the ERRORLEVEL is for columns.
-
- EXAMPLE 5:
- GCURS V
-
- Places the current row and column into the two variables ROW and
- COL .
-
-
- GDIR
-
- Sets the Dos variable DIR to the current directory path.
-
- Example use:
-
- GDIR
- CD \GAMES
- GAME
- CD\%DIR%
-
- In the above batch file, the current directory would be saved in
- the variable DIR, then we change to the new directory games,
- execute some game, and finally return back to the original
- directory via the CD\%DIR% .
-
-
- GDRIVE
-
- Returns an errorlevel from 0 thru 255 for the current active
- drive, where 0=A, 1=B, etc...
-
-
- GETCC [V]
-
- Returns an errorlevel equal to the cursor column number, or
- alternately places the value into a DOS variable CC, if the
- switch V is included on the command line
-
-
- GETCOLR [F] [B]
-
- Returns an errorlevel equal to the current screen colors.
-
- EXAMPLE 1:
- GETCOLR
-
- Returns an errorlevel equal to both foreground and background
- colors (combined).
-
- EXAMPLE 2:
- GETCOLR F
-
- Returns an errorlevel equal to the foreground color.
-
- EXAMPLE 3:
- GETCOLR B
-
- Returns an errorlevel equal to the background color.
-
-
- GETCR [V]
-
- Returns an errorlevel equal to the current cursor row, or returns
- the value in the variable CR, if the switch V is included on the
- command line.
-
-
- GETMCB
-
- Displays a list, showing the current memory usage.
-
-
-
-
-
-
-
-
- GETNUM [n....]
-
- Returns an errorlevel equal to the value of the numeric key
- pressed, or sounds the speaker if any other key is pressed.
- Alternately, the user may specify which numeric keys are
- acceptable.
-
-
- EXAMPLE 1:
- GETNUM
-
- Accepts all numeric keys for input, returning the value as an
- errorlevel (IE.... 0=0, 1=1, etc....).
-
- EXAMPLE 2:
- GETNUM 123
-
- Accepts only numeric keys 1 thru 3, return errorlevels for the
- numeric key pressed of 1 thru 3.
-
- The second variation of this function is useful for batch files
- used in menus, Example :
-
- :MENU
- ECHO Menu
- ECHO
- ECHO (1) Games
- ECHO (2) Format disk
- ECHO (3) Dos
- ECHO
- ECHO Your choice (1-3) ?
- GETNUM 123
- IF ERRORLEVEL 3 GOTO XIT
- IF ERRORLEVEL 2 GOTO FMT
- GAME
- GOTO MENU
- :FMT
- FORMAT A:
- GOTO MENU
- :XIT
- {BLANK LINE}
-
- The above batch file would either start a game, format a disk, or
- place the user at the Dos prompt.
-
-
- GETPG
-
- Returns an errorlevel equal to the active video page. For CGA
- systems, this is usually a value between 1 and 4.
-
-
- GETVER [M] [V]
-
- Returns an errorlevel equal to the current Dos version (0 if Dos
- version 1.x) or alternately can set the Dos variable VER to the
- version number.
-
- The following examples assume a Dos version of 3.2.
-
- EXAMPLE 1:
- GETVER
-
- Returns an errorlevel of 3 (major version)
-
- EXAMPLE 2:
- GETVER M
-
- Returns an errorlevel of 2 (minor version)
-
- EXAMPLE 3:
- GETVER V
-
- Sets the variable VER to 3.2 .
-
-
- GMEN [B] [s] [V]
-
- Returns an errorlevel equal to the amount of ram left for use in
- the system.
-
- EXAMPLE 1:
- GMEN
-
- Returns an errorlevel equal to the ram size in K bytes.
-
- EXAMPLE 2:
- GMEN B
-
- Returns an errorlevel equal to the ram size in 4K byte chunks,
- IE... 4K = 1, 8K = 2, etc....
-
- EXAMPLE 3:
- GMEN 4000
-
- Compares the value 4000 against your actual ram size, returning
- an errorlevel of 0 if equal, 1 if greater, and 2 if less.
-
- EXAMPLE 4:
- GMEN V
-
- Sets the Dos variable MEM equal to the ram size.
-
-
- GMODE
-
- Returns an errorlevel equal to the current video mode, where :
-
- 0 = CGA 40x25 black & white
- 1 = CGA 40x25 color
- 2 = CGA 80x25 black & white
- 3 = CGA 80x25 color
- 4 = 320x200 4 color graphics mode
- 5 = 320x200 4 color graphics mode (color burst off)
- 6 = 640x200 2 color graphics mode
- 7 = 80x25 Monochrome adapter
- 8 = 160x200 16 color graphics mode (PCjr)
- 9 = 320x200 16 color graphics mode (PCjr)
- 10 = 640x200 4 color graphics mode (PCjr)
- 11 = ?
- 12 = ?
- 13 = 320x200 16 color graphics mode (EGA)
- 14 = 640x200 16 color graphics mode (EGA)
- 15 = 640x350 monochrome graphics mode (EGA)
- 16 = 640x350 4 color graphics mode (EGA)
-
-
- INKEY {key_val},/EAZXScCbc,fc
-
- Retrieves single keystrokes, setting the errorlevel to the ascii
- value of the keystroke, or alternately allows assigning values to
- specific keys, where :
-
- E = echo mode on (echo char entered)
- A = set error level to ascii if no assignment
- Z = set error level to 0 if no assignment
- X = respond to extended keys only
- Predefined return codes for extended keys are :
- UP = 1 DOWN = 2 LEFT = 3
- RIGHT = 4 PAGE UP = 5 PAGE DOWN = 6
- HOME = 7 END = 8 INSERT = 9
- DELETE = 9
- FUNCTION KEYS 1 THRU 10 = 10 THRU 19
- S = set list separator (separator follows the S), default
- is a comma
- C = color, background color (decimal) is immediately
- after the S, followed by the separator char, then the
- foreground color
-
-
-
-
-
-
-
-
- {INKEY} continued
-
- EXAMPLE 1:
- INKEY
-
- Returns an errorlevel equal to the keystroke character, but
- ignores any extended keystrokes (such as function keys), by
- beeping the speaker.
-
- EXAMPLE 2:
- INKEY A1,B2,C3,D4,E5,F10
-
- Returns an errorlevel of 1 thru 10 for the specified keystrokes
- of A thru F . You may assign as many keystrokes in this manner as
- may fit on a Dos command line. Notice the skip in assignments
- between E and F, where E is assigned an errorcode of 5 and F an
- errorcode of 10. This mode ignores any other keystroke, while
- beeping the speaker for other than keystrokes of A thru F.
-
- EXAMPLE 3:
- INKEY /E
-
- Returns an errorlevel equal to the keystroke character, ignores
- extended key strokes, and echo's the keystroke.
-
- EXAMPLE 4:
- INKEY A1,B3,C5,D7,E9,/E
-
- Returns the assigned errorlevels of 1 thru 9 for keystrokes of A
- thru E, ignoring all other keystrokes by beeping the speaker, but
- echo's the accepted keystroke.
-
- EXAMPLE 5:
- INKEY A1,B2,C3,D5,/A
-
- Returns an errorlevel of 1 thru 5, for assigned keystrokes, all
- other keystrokes, except extended ones, will return the ascii
- value of the keystroke. Pressing any extended key causes the
- speaker to beep.
-
- EXAMPLE 6:
- INKEY A1,B2,C3,D5,/Z
-
- Same as example 5, except all unassigned keystrokes return an
- errorlevel of 0.
-
-
-
-
-
-
- {INKEY} continued
-
- EXAMPLE 7:
- INKEY /X
-
- Returns an error for extended key strokes, see above for
- errorlevels returned.
-
- EXAMPLE 8:
- INKEY /S*
-
- Sets the command line delimiter to the "*" !
-
- EXAMPLE 9:
- INKEY A1,B2,C3,D4,E5,/C1,7
-
- Same as example 2, except the keystroke will be echoed using the
- chosen colors of white on blue.
-
- Most of the switches may be mixed on the command line, except of
- course the X switch, which is for extended keys, and the will not
- display (echo).
-
-
- INSTR s c vname oname [/X]
-
- Searches for the first occurrence of 'c' starting at 's' in
- variable 'vname', to output variable 'oname'. The search
- character must be specified as a decimal value (IE...65=A),
- unless the switch '/X' is included on the command line.
-
- EXAMPLE 1:
- INSTR 1 65 VAR1 VAR2
-
- Where VAR1=HARRY
-
- Outputs the string 'ARRY' to VAR2.
-
- EXAMPLE 2:
- INSTR 1 A VAR1 VAR2 /X
-
- Same as example 1, notice that the character 'A' is now specified
- by using the ascii character instead of a decimal value.
-
-
- INVERT
-
- Swaps the foreground an background colors, of the entire screen.
- If the foreground color is greater than 15 then the background
- color will blink on Monochrome and CGA systems.
-
-
-
- KEYSTAT
-
- Returns an errorlevel of 0 thru 4, where :
-
- 1 = Scroll lock on
- 2 = Num lock on
- 4 = Caps lock on
- 0 = All locks off
-
-
- LEN vname
-
- Returns an errorlevel equal to the length of the specified
- variable 'vname', or a zero if the variable does not exist, or is
- not specified.
-
-
- LIMCK
-
- Returns an errorlevel of 1 if a LIM driver is detected, else
- returns a zero.
-
-
- LINE sr sc l [bc fc] [Pn]
-
- Draws a line, using single line graphics, starting on row 'sr',
- column 'sc'for length 'l', using optional background 'bc' and
- foreground 'fc' colors on the optional page 'Pn'.
-
- EXAMPLE 1:
- LINE 5 5 30
-
- Draws a line at row 5, column 5 of 30 characters in length, using
- the existing colors as found at row 5, column 5, and the current
- video page (active).
-
- EXAMPLE 2:
- LINE 5 5 30 1 7
-
- Same as example 1, except the colors of white on blue are
- specified.
-
- EXAMPLE 3:
- LINE 5 5 30 1 7 P2
-
- Same as example 2, except that video page 2 is specified, and may
- or may not be the active video page.
-
-
-
-
-
- LOCATE sr sc p
-
- Positions the video cursor to the location specified, where 'sr'
- is the row, and 'sc' is the column. Alternately, the video page
- may be specified 'p'
-
- EXAMPLE 1:
- LOCATE 5 5
-
- Positions the cursor at row 5, column 5.
-
- EXAMPLE 2:
- LOCATE 5 5 2
-
- Same as example 1, except the cursor on video page 2 is affected,
- and may or may not be the active video page. This feature is
- useful to those with systems which large amounts of video memory.
-
-
- LOGON [O]
-
- Updates a file (LOGIN.LOG), with login name, time and date, or
- alternately, the logout name, time and date.
-
- EXAMPLE 1:
- LOGON
-
- Prompts the current user for their name, then appends that name,
- and time and date to the file LOGIN.LOG in the current directory.
- The line appended would look like :
-
- BUDDY LOGGED IN @ 09-23-1988 08:23:10
-
- EXAMPLE 2:
- LOGON O
-
- Same as example 2, except the following will be appended to the
- file LOGIN.LOG :
-
- BUDDY LOGGED OUT @ 09-23-1988 08:35:15
-
-
- LPT1TO2 (or PRNSWAP)
-
- Reassigns printer port 1 as printer port 2, and printer port 2
- becomes printer port 1, and may be referred to as the PRN device.
-
-
-
-
-
-
- LST fname
-
- Displays the file 'fname', one page at a time. The text file may
- be scrolled by pressing either the space bar, or by pressing the
- enter key. Scrolling backwards is not allowed.
-
- The utility also returns an errorlevel of 0 if everything was ok,
- and errorlevel of 1 if the file was not found, or and errorlevel
- of 2 if the file was not specified.
-
- Pressing the escape key at any time exits.
-
-
- MIDSTR s l vname oname
-
- Places a selected portion of the string 'vname' into the output
- string 'oname', where 's' is the start of the string to extract
- from 'vname', and 'l' is the length (number of characters) to
- extract, starting at 's'.
-
- EXAMPLE :
-
- Assuming string 'STR1' contains "We are the people of the US".
-
- MIDSTR 12 16 STR1 STR2
-
- would return the string "people of the US" in variable STR2.
-
- If 'l' is longer than the remaining characters in 'vname', then
- 'oname' will contain the string starting at 's' and ending at the
- final character in 'vname'.
-
-
- MOUSECK
-
- Returns an errorlevel of 0 if a mouse driver is not detected, or
- an errorlevel of 1 if it is.
-
-
- MOVCUR [U] [D] [L] [R] [n]
-
- Moves the cursor in the desired direction :
-
- U = up D = down
- L = left R = right
-
- by an optional value of 'n' or the default value of 1.
-
-
-
-
-
- {MOVCUR} continued
-
- EXAMPLE 1:
- MOVCUR U
-
- Moves the cursor up one line (if possible).
-
- MOVCUR D
-
- Moves the cursor down one line.
-
- EXAMPLE 2:
- MOVCUR L 3
-
- Moves the cursor left 3 columns if possible.
-
- MOVCUR R 3
-
- Moves the cursor right 3 columns.
-
-
- PAGE p V
-
- Returns an errorlevel equal to the current video page, or sets
- the active video page to 'p', or returns the active video page
- number in the variable PAGE, if the switch V is found on the
- command line.
-
- EXAMPLE 1:
- PAGE
-
- Returns an errorlevel of 1 thru 4 for the active page on a CGA
- system, 1 for most monochrome systems, and values in access of 4
- in systems with EGA or VGA .
-
- EXAMPLE 2:
- PAGE 2
-
- Sets the active page to 2, if possible, or returns an errorlevel
- of 1 if it fails.
-
- EXAMPLE 3:
- PAGE V
-
- Sets the Dos variable PAGE to the active page number.
-
-
-
-
-
-
-
- PASSWORD [S]
-
- Prompts the user for a password. The entered password is hidden
- by use of inverse video characters as the password is entered.
- PASSWORD allows 3 attempts at the password, then locks up the
- system, forcing the user to reboot. Alternately, the user may
- append an 'S' after the function name, and after entering the
- correct current password, will be prompted for a new password.
-
-
- PATHCK name
-
- Checks for the existence of the directory 'name' in the current
- directory. If the directory 'name' exists, an errorlevel of 0 is
- returned, if 'name' does not exist, then an errorlevel of 1 is
- returned, and if 'name' is not specified, then an errorlevel of 2
- is returned.
-
-
- PFF
-
- Sends a form feed to the PRN device (first printer - LPT1).
-
-
- PRDY
-
- Returns an errorlevel depending upon the status of the first
- printer (PRN or LPT1), where :
-
- 0 = OK 1 = Timed out
- 2 = Gen Failure 3 = No paper
- 4 = Busy 5 = Off line
-
-
- PRINT message
-
- Sends the string 'message' to the PRN (LPT1) device. Accepts
- only input that Dos allows on the command line. Don't use the
- redirectors '<' or '>' or pipe '|', unless enclosed in
- parentheses
-
- EXAMPLE :
-
- PRINT Hi Paul
-
- Sends the message 'Hi Paul' to the first printer (LPT1).
-
- PRINT "Don't use > unless it's included inside quotes"
-
- Sends the entire message including quotes to the printer.
-
-
- PRINTC n
-
- Prints the ascii character represented by the numeric decimal
- value 'n', or multiple characters separated by spaces.
-
- EXAMPLE 1:
- PRINTC 65
-
- Prints the single ascii character 'A'.
-
- EXAMPLE 2:
- PRINTC 27 77
-
- Sends the escape sequence for putting most printers into elite
- mode .
-
-
- PRINTF name
-
- Sends any file, up to 64k bytes, to the printer. No special
- controls are performed. This is only a convenience to the user,
- as the Dos COPY command can just as easily be used.
-
-
- PRNSET
-
- Performs a hardware reset to the PRN device.
-
-
- RESPONSE var bc fc l [N]
-
- Sets the variable 'var' to the text entered from the keyboard,
- using the optional colors for background 'bc' and foreground 'fc'
- but requires the length to be specified. 'N' is a switch which
- prevents keystrokes from being echoed to the display, this is
- useful for use as Password entry.
-
- EXAMPLE 1:
- RESPONSE NAME 1 7 9
-
- Sets the the variable 'NAME' equal to the next 9 keystrokes or
- until the enter key is pressed, which ever is first. The
- keystrokes are echoed using white on blue.
-
- EXAMPLE 2:
- RESPONSE NAME 1 7 9 N
-
- Same as example 1, except the keystrokes are not echoed.
-
-
-
-
-
- SAVEKEY [c] [/n]
-
- Places characters into the typeahead buffer.
-
- EXAMPLE 1:
- SAVEKEY 123
-
- Places the character sequence '123' into the keyboard buffer.
-
- EXAMPLE 2:
- SAVEKEY /49 50 51
-
- Same as example 1, but the characters are entered as decimal
- values.
-
-
- SCROLL sr sc er ec bc fc [D]
-
- Scrolls a selected portion of the screen up or down, using
- optional colors.
-
- EXAMPLE 1:
- SCROLL 5 5 10 75 1 7
-
- Scrolls the video area starting at row 5, column 5 thru row 10,
- column 75 using colors white on blue for the last line.
- Actually, lines 5 thru 10 are scrolled up one, thus losing the
- original line 5, and clearing a new line 10.
-
- EXAMPLE 2:
- SCROLL 5 5 10 75 1 7 D
-
- The inverse of example 1, where lines 5 thru 10 are scrolled down
- one, losing the original line 10, and clearing a new line 5.
-
-
- SCROLMSG [/bc fc l] message
-
- Displays the string 'message' on line 25, scrolling it from right
- to left, optionally, the colors and line may be set.
-
- EXAMPLE 1:
- SCROLMSG Hello there
-
- Scrolls the message 'Hello there' on line 25 from right to left.
-
-
-
-
-
-
- {SCROLMSG} continued
-
- EXAMPLE 2:
- SCROLMSG /1 7 Hello there
-
- Same as example 1, except the message is displayed in white on
- blue.
-
- EXAMPLE 3:
- SCROLMSG /1 7 12 Hello there
-
- Same as example 2, except the message is displayed on line 12.
-
- EXAMPLE 4:
- SCROLMSG /12 Hello there
-
- Same as example 1, except the message is displayed on line 12.
-
-
- SETCUR sr er
-
- Sets the cursor style to block, or line, by selecting the
- starting 'sr' and ending 'er' rows for the cursor.
-
- EXAMPLE :
- SETCUR 3 7
-
- Sets the cursor as a block, starting at scan line 3 and ending at
- scan line 7.
-
-
- SETDATE mm-dd-yyyy
-
- Sets the Dos date to the specified date of mm-dd-yyyy, where :
-
- mm = month in two decimal digit format, 01 thru 12
- dd = day of month in two decimal digit format
- yyyy = year in 4 decimal digit format
-
- NOTE: must use hyphens to separate month and day, and day and
- year.
-
-
- SETERR n
-
- Sets the batch file errorlevel between 0 and 255 (n). Great for
- testing batch files or when you need to branch based on an
- errorlevel.
-
-
-
-
-
- SETIME hh:mm:ss
-
- Sets the Dos time to that specified in the above format, where :
-
- hh = hours in 2 digit format (00 - 24)
- mm = minutes in 2 digit format
- ss = seconds in 2 digit format
-
- NOTE: must use colons to separate the units of time.
-
-
- SETMODE n
-
- Sets the video mode to value n, where :
-
- 0 = 40x25 black & white (CGA)
- 1 = 40x25 color (CGA)
- 2 = 80x25 black & white (CGA, EGA & VGA)
- 3 = 80x25 color (CGA, EGA & VGA)
- 4 = 320x200 4 color graphics
- 5 = 320x200 4 color graphics - color burst off
- 6 = 640x200 2 color graphics
- 7 = Monochrome adapter
- 8 = 160x200 16 color graphics - low resolution - PCjr
- 9 = 320x200 16 color graphics - med. resolution - PCjr
- 10 = 640x200 4 color graphics - high resolution - PCjr
- 13 = 320x200 16 color graphics - EGA
- 14 = 640x200 16 color graphics - EGA
- 15 = 640x350 monochrome graphics - EGA
- 16 = 640x350 16 color graphics - EGA
-
-
- SETPG p
-
- Sets the active video page to page 'p'. Page numbers are from 1
- thru 4 for CGA systems.
-
-
- SHOWVAR vname [/XNPpLcRlCbc fc]
-
- Displays the variable 'vname'. This can be done, using the Dos
- echo command, with the %vname%, but that usage includes showing
- the variable name (IE... PATH=A:\), while SHOWVAR only shows the
- actual variable (IE... A:\). The switches are as follows :
-
-
-
-
-
-
-
- {SHOWVAR} continued
-
- X = center variable on line
- N = don't issue a line feed / carriage return
- Pp = Page number 'p'
- Lc = Left margin at column 'c'
- Rl = Use line number 'l'
- Cbc fc = Use background 'bc' and foreground 'fc'
- colors. Separate the colors with a space.
-
- EXAMPLE 1:
- SHOWVAR PATH
-
- Displays the PATH at the current cursor position.
-
- EXAMPLE 2:
- SHOWVAR PATH /X
-
- Displays the PATH on the current line, but centered
-
- EXAMPLE 3:
- SHOWVAR PATH /P2
-
- Displays the PATH at the current cursor position, but on video
- page 2, which may or may not be the active video page.
-
- EXAMPLE 4:
- SHOWVAR PATH /L5
-
- Displays the PATH on the current line, starting at column 5.
-
- EXAMPLE 5:
- SHOWVAR PATH /R5
-
- Displays the PATH on line 5, at the current column number.
-
- EXAMPLE 6:
- SHOWVAR PATH /C1 7
-
- Displays the PATH at the cursor location, using white on blue.
-
- NOTE: if the 'C' switch and colors are not specified, then the
- colors used will be what is currently available at the specified
- location or at the cursor location.
-
-
- SKEY
-
- Returns an errorlevel of 0 if no keystroke is waiting, else if
- one is ready, then an errorlevel of 1 is returned.
-
-
-
- SNGLBOX sr sc er ec bc fc
-
- Draws a box, using single line graphics, starting at row 'sr',
- column 'sc' and ending at row 'er', column 'ec', using the
- optional colors 'bc' and 'fc' (background an foreground).
-
- EXAMPLE 1:
- SNGLBOX 5 5 10 30
-
- Draws a box starting at row 5, column 5 thru row 10, column 30.
-
- EXAMPLE 2:
- SNGLBOX 5 5 10 30 1 7
-
- Same as example 1, except the box is drawn in white on blue.
-
-
- SOUND [d t]
-
- Sounds the speaker for about 1 second, or for duration 'd' and
- tone 't'.
-
- EXAMPLE 1:
- SOUND
-
- Sounds the speaker at about 100 hz for 1 second.
-
- EXAMPLE 2:
- SOUND 10 20
-
- Sounds the speaker for about 2 seconds at about 200 herz.
-
-
- SROWS
-
- Returns an errorlevel equal to the cursor row.
-
-
- STRING r c bc fc [/P] [/Sp]
-
- Displays or prints 'r' number of 'c' characters, where 'r' and
- 'c' are both decimal values. The background 'bc' and foreground
- 'fc' colors may be specified, and specifying '/P' will print
- instead of displaying the string, while using '/Sp' will display
- the string on the selected video page.
-
- EXAMPLE 1:
- STRING 5 65
-
- Displays 5 A's at the current cursor location.
-
- {STRING} continued
-
- EXAMPLE 2:
- STRING 5 65 1 7
-
- Same as example 1, except the string is displayed as white on
- blue characters.
-
- EXAMPLE 3:
- STRING 5 65 /P
-
- 5 A's are sent to the PRN device.
-
- EXAMPLE 4:
- STRING 5 65 /S2
-
- Same as example 1, except that the characters are displayed on
- page 2, which may or may not be the active video page.
-
-
- SUB vname v
-
- Subtracts the decimal value 'v' from the Dos variable 'vname'.
-
- EXAMPLE :
-
- Assume : AMNT=45, where AMNT is a Dos variable, then the
- following line :
-
- SUB AMNT 5
-
- Would result in the variable result of AMNT=40.
-
- NOTE: decimal value 'v' is optional, and if not specified, a
- value of 1 is subtracted from 'vname'.
-
-
- SWIDTH
-
- Returns an errorlevel equal to the column width of the video
- system in use. If your video system is in 80 column mode, then
- this would return an errorlevel of 80.
-
-
- WAIT n
-
- Pauses the system for 'n' seconds or milliseconds. If 'n' is a
- value larger than 9, then the pause is in milliseconds, while
- values between 1 and 9 are in seconds.
-
-
-
- WAITILL hh:mm:ss
-
- Pauses the system until the specified time. The specified time
- must be in the above format, including the colons. You may not
- specify the time as either an hour, or hour and minutes, in other
- words, the time must include hours, minutes and seconds. If the
- correct time is not specified, then an errorlevel of 1 is
- returned.
-
-
- WAITM n
-
- Pauses the system for 'n' minutes, where n may be a decimal value
- between 1 and 9.
-
-
- WHATDAY
-
- Returns an errorlevel between 1 an 7 for the day of week, where :
-
- 1=Sunday 2=Monday
- 3=Tuesday 4=Wednesday
- 5=Thursday 6=Friday
- 7=Saturday
-
-
- WHATHR
-
- Returns an errorlevel equal to the hour of the day, in 24 hour
- format. IE...2=2AM 14=2PM
-
-
- WHATMIN
-
- Returns an errorlevel equal to the current minute.
-
-
- WHATMO
-
- Returns an errorlevel equal to the current month, where :
-
- 1=January 2=February
- 3=March 4=April
- 5=May 6=June
- 7=July 8=August
- 9=September 10=October
- 11=November 12=December
-
-
-
-
-
-
- WHATYR
-
- Returns and errorlevel equal to the number of years since 1980.
- If the current year is 1988, then this function will return an
- errorlevel of 8.
-
-
- WRITE /LcRlPpXNCbc fc,message
- WRITE message /LcRlPpXNCbc fc
-
- Displays the string 'message', using the following options :
-
- Lc = use left margin 'c'
- Rl = use line 'l'
- Pp = use page 'p'
- X = center on line
- N = no CR/LF at end of line
- Cbc fc = color, where :
- bc = background
- fc = foreground
-
- Notice the comma between the message and the switch list, in the
- first syntax version, this is required, only in the first syntax.
-
- EXAMPLE 1:
- WRITE
-
- Moves the cursor down one line, and to the left column.
-
- EXAMPLE 2:
- WRITE Hi there
-
- Displays the message "Hi there" at the current column and line.
-
- EXAMPLE 3:
- WRITE /L8,Hi there
-
- Displays the message "Hi there" on the current line, and at
- column 8.
-
- EXAMPLE 4:
- WRITE /R5,Hi there
-
- Displays the message "Hi there" on line 5, and the current
- column.
-
-
-
-
-
-
- {WRITE} continued
-
- EXAMPLE 5:
- WRITE /P2,Hi there
-
- Displays the message "Hi there" at the current line and column on
- page 2, which may or may not be the active video page.
-
- EXAMPLE 6:
- WRITE /X,Hi there
-
- Displays the message "Hi there" on the current line, centered.
-
- EXAMPLE 7:
- WRITE /N,Hi there
-
- Displays the message "Hi there" at the current line and column,
- but leaves the cursor at the end of the line.
-
- EXAMPLE 8:
- WRITE /C1 7,Hi there
-
- Displays the message "Hi there" at the current line and column,
- using white on blue.
-
- EXAMPLE 9:
- WRITE /L8R5P2NC1 7,Hi there
-
- Displays the message "Hi there" on line 5, column 8, page 2,
- using white on blue, and leaves the cursor at the end of the line
-
- EXAMPLE 10:
- WRITE /R5XP2C1 7,Hi there
-
- Displays the message "Hi there", centered on line 5, using white
- on blue, on video page 2.
-
- EXAMPLE 11:
- WRITE Hi there /R5XP2C1 7
-
- Same as example 10.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- WRITEF fname [/Pp]
-
- Displays file 'fname' (max of 4 kbytes), using the current column
- position as the left margin, starting at the current line number,
- using any existing colors as already may be on the display. The
- optional page 'p' may be specified with the '/P' switch.
-
- EXAMPLE 1:
- WRITEF MENU
-
- Displays the file MENU.
-
- EXAMPLE 2:
- WRITEF MENU /P2
-
- Displays the file MENU on video page 2.
-
-
- XMSCK
-
- Returns an errorlevel of 1 if an extended memory device driver
- has been installed, else returns an errorlevel of 0.
-
-
- YN [message]
-
- Returns an error level of 1 if the 'n' key is depressed or a 0 if
- the 'y' key is depressed. YN accepts either upper or lower case,
- and any key depressed but Y or N results in the speaker beeping.
- Optionally a message may be displayed, at the current cursor
- position.
-
- EXAMPLE 1:
- YN
-
- Waits for either the Y or N key to be depressed.
-
- EXAMPLE 2:
- YN Are you running Dos?
-
- Displays the message "Are you running Dos?", then waits for
- either the Y or N key to be depressed.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- YRSINCE yyyy
-
- Returns an errorlevel equal to the difference of the current date
- subtracted from the specified date yyyy. If the date is entered
- as 2 digits, then the century is assumed to be 1900.
-
- EXAMPLE:
- YRSINCE 1980
-
- Returns an ERRORLEVEL of 8, if the current year is 1988.
-
-
- YRSTILL yyyy
-
- Returns an errorlevel equal to the difference of the current year
- and the specified year. If the specified year is 2 digits, then
- the year is assumed to be in the 19th century.
-
- EXAMPLE 1:
- YRSTILL 1990
-
- Assuming the current year is 1987, then this function will return
- an errorlevel of 2.
-
- EXAMPLE 2:
- YRSTILL 90
-
- Same as example 1.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-